<?php

/**
 * SigmaCMS - Content Management System
 *
 * Copyright (C) 2008 Pavol Biely
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 *
 * @package    SigmaCMS
 * @author     Pavol Biely <pavolbiely@gmail.com>
 * @copyright  2008 Pavol Biely
 * @license    http://www.gnu.org/licenses/gpl.txt   GNU General Public License
 * @link       http://pabi3.com/
 * @since      0.1.0
 */

if (!defined('INSTALLATION')) die('Access denied!');

echo "<h1>"._SIGMACMS_INSTALL."</h1>\n";
echo "<h2>"._STEP_1."</h2>\n";

echo "<form action='index.php?step=1' method='post'>\n";

echo "<fieldset>\n";
echo "<ol>\n";

echo "<li>\n";
echo "<label for='language'>"._LANGUAGE."</label>\n";
echo "<select id='language' name='language'>\n";
foreach ($cfg['languages'] as $key => $value) {
	if (isset($_SESSION['language']) && $_SESSION['language'] == $key) {
		echo "<option value='$key' selected='selected'>$value</option>\n";
	} else {
		echo "<option value='$key'>$value</option>\n";
	}
}
echo "</select>\n";
echo "</li>\n";

echo "</ol>\n";
echo "</fieldset>\n";

echo "<fieldset class='submit'>\n";
echo "<input name='step1' type='submit' value='"._NEXT_STEP."' />\n";
echo "</fieldset>\n";

echo "</form>\n";
